/***********************************************************************
    filename:   DaterButton.h
    created:    10/4/2012
    author:     4Ys

    purpose:    Defines class for button objects in UI
*************************************************************************/
#ifndef _DaterButton_h_
#define _DaterBUtton_h_

#include "cegui.h"
#include "DaterBaseWindow.h"
#include <string>

class Button
{
	/*!
	\brief
		Defines the button in windows of UI.
	*/
public:
		/* !
		\brief
			Construct the sample of class Button.

		\param linkedWindow
			- a BaseWindow point to window linked.
			
		\param rootWindow
			- a BaseWindow point to window rooted.
		*/
	Button(BaseWindow* linkedWindow, CEGUI::Window* rootWindow);
	
		/* !
		\brief
			Construct the sample of class Button.

		\param linkedWindow
			- a BaseWindow point to window linked.
			
		\param rootWindow
			- a BaseWindow point to window rooted.
			
		\param n
		*/
	Button(CEGUI::Window* linkedWindow,CEGUI::Window *rootWindow,int n);

private:
	BaseWindow* _linkedWindow;
	CEGUI::Window* _linkWindow;
	CEGUI::Window* _root;
	int child_num;
	std::string _name;

	bool handle_Clicked(const CEGUI::EventArgs& args);
	bool handle_Clicked_child(const CEGUI::EventArgs& args);
};

#endif